import request from '@/utils/request'


// 查询单位数据列表
export function findCustomers(params) {
  return request({
    url: '/api/Base/GetU8Customer',
    method: 'get',
    params: params
  })
}


// 查询合同列表
export function getContractList(data) {
  return request({
    url: '/api/Base/GetHT',
    method: 'post',
    data: data
  })
}
// 查询通电验收合同列表
export function getContractTDYSList(data) {
  return request({
    url: '/api/Base/GetHTTDYS',
    method: 'post',
    data: data
  })
}
// 查询交货验收合同列表
export function getContractJHYSList(data) {
  return request({
    url: '/api/Base/GetHTJHYS',
    method: 'post',
    data: data
  })
}

// 查询结算资料合同列表
export function getContractHTJSZList(data) {
  return request({
    url: '/api/Base/GetHTJSZL',
    method: 'post',
    data: data
  })
}


// 查询合同信息
export function getContractInfo(params) {
  return request({
    url: '/api/Base/GetOneHT',
    method: 'get',
    params: params
  })
}



// 查询存货信息
export function GetInventory2(params) {
  return request({
    url: '/api/Base/GetInventory2',
    method: 'get',
    params: params
  })
}

// 查询条款信息
export function GetTK(params) {
  return request({
    url: '/api/Base/GetTK',
    method: 'get',
    params: params
  })
}


// 上传文件
export function uploadFile(data) {
  return request({
    url: '/api/Base/uploadFile',
    method: 'post',
    headers: {
      'Content-Type':'multipart/form-data'
    },
    data: data
  })
}


// 查询合同类型

export function getTKType(params) {
  return request({
    url: '/api/Base/GetTKType',
    method: 'get',
    params: params
  })
}


// 查询条款内容

export function getTK(params) {
  return request({
    url: '/api/Base/GetTK',
    method: 'get',
    params: params
  })
}

// 删除条款类型

export function DelTKType(data) {
  return request({
    url: '/api/Base/DelTKType',
    method: 'post',
    data: data
  })
}
// 删除条款类型

export function DelTK(data) {
  return request({
    url: '/api/Base/DelTK',
    method: 'post',
    data: data
  })
}


// 保存条款类型

export function SaveTKType(data) {
  return request({
    url: '/api/Base/SaveTKType',
    method: 'post',
    data: data
  })
}

// 保存条款

export function SaveTK(data) {
  return request({
    url: '/api/Base/SaveTK',
    method: 'post',
    data: data
  })
}
//保存合同附件--保存之后就是归档状态
export function SaveHTFile(data)
{
  return request({
    url: '/api/Base/SaveHTFile',
    method: 'post',
    data: data
  })
}


// 单据审核

export function ApproveDocument(data) {
  return request({
    url: '/api/Base/ApproveDocument',
    method: 'post',
    data: data
  })
}


// 查詢基礎檔案
export function findbaseBasicManage(data, params) {
  return request({
    url: '/BasicArchivesManage/Mechanism/popupList',
    method: 'get',
    params: params,
    data: data
  })
}


// 查詢基礎檔案
export function login(params) {
  return request({
    url: '/SystemManage/Manage/LoginForm',
    method: 'post',
    params: params,
  })
}





// 查詢存货信息
export function findBoxData(params) {
  return request({
    url: '/BasicArchivesManage/Inventory/ComboBoxData',
    method: 'post',
    params: params,
  })
}


// 查詢客户对照
export function findListwldza(params) {
  return request({
    url: '/BasicArchivesManage/Inventory/Listwldz',
    method: 'get',
    params: params,
  })
}


// 查詢部门
export function findDepts(params) {
  return request({
    url: '/BasicArchivesManage/Department/ComboBoxData',
    method: 'post',
    params: params,
  })
}


// 查詢编码
export function getCode(params) {
  return request({
    url: '/api/Base/GetCode',
    method: 'get',
    params: params,
  })
}
// 单据审核提交审批流
export function ApproveDocumentCheck(params) {
  return request({
    url: '/api/Base/ApproveHT',
    method: 'get',
    params: params
  })
}

// 获取公司绑定业务员
export function GetSalesMan(params) {
  return request({
    url: '/api/Base/GetSalesMan',
    method: 'get',
    params: params
  })
}

// 获取收款计划单列表
export function GetSKJHByHT(params) {
  return request({
    url: '/api/Base/GetSKJHByHT',
    method: 'get',
    params: params
  })
}




// 获取明细数据
export function getTHFH(params) {
  return request({
    url: '/api/Base/GetTHFH',
    method: 'get',
    params: params
  })
}




// 获取明细数据
export function asyncU8Data(params) {
  return request({
    url: '/api/Base/U8toKSXSData',
    method: 'get',
    params: params
  })
}




// 获取权限
export function userRole(params) {
  return request({
    url: '/SystemManage/Role/js',
    method: 'get',
    params: params
  })
}

// 查询合同审批流
export function findProcessInfo(params) {
  return request({
    url: '/api/Base/GetProcessInfo',
    method: 'get',
    params: params
  })
}


// 合同导入
export function importContract(data) {
  return request({
    url: '/api/HTManage/imoprtExcel',
    method: 'post',
    headers: {
      'Content-Type':'multipart/form-data'
    },
    data: data
  })
}
// 合同标的导入
export function DetailImoprtExcel(data) {
  return request({
    url: '/api/HTManage/DetailImoprtExcel',
    method: 'post',
    headers: {
      'Content-Type':'multipart/form-data'
    },
    data: data
  })
}






// 期初合同导入
export function importE(data) {
  return request({
    url: '/api/BeginDataMng/importE',
    method: 'post',
    headers: {
      'Content-Type':'multipart/form-data'
    },
    data: data
  })
}




// 期初合同导入
export function QcImoprtExcel(data) {
  return request({
    url: '/api/BeginDataMng/QcImoprtExcel',
    method: 'post',
    headers: {
      'Content-Type':'multipart/form-data'
    },
    data: data
  })
}



// 查询合同虚拟转正式变更审批流
export function GetChProcessInfo(params) {
  return request({
    url: '/api/base/GetChProcessInfo',
    method: 'get',
    params: params
  })
}

// 查询合同变更审批流
export function GetBGProcessInfo(params) {
  return request({
    url: '/api/base/GetBGProcessInfo',
    method: 'get',
    params: params
  })
}


//查询用户分页
export function GetUserPageData(data) {
  return request({
    url: '/api/UserToCust/GetUserPageData',
    method: 'post',
    data: data
  })
}
//查询客户分页
export function GetCumPageData(data) {
  return request({
    url: '/api/UserToCust/GetPageData',
    method: 'post',
    data: data
  })
}

//删除分配
export function DeleteCumData(data) {
  return request({
    url: '/api/UserToCust/Delete',
    method: 'post',
    data: data
  })
}


//获取客户
export function GetCumU8Customer(params) {
  return request({
    url: '/api/UserToCust/GetCustPageData',
    method: 'post',
    data: params
  })
}


//绑定客户
export function addUserToCust(data) {
  return request({
    url: '/api/UserToCust/Edit',
    method: 'post',
    data: data
  })
}


//撤销归档
export function BackOutGD(params) {
  return request({
    url: '/api/HTManage/BackOutGD',
    method: 'get',
    params: params
  })
}



//期初发货合同上传文件明细
export function GetOneData(params) {
  return request({
    url: '/api/BeginDataMng/GetOneData',
    method: 'get',
    params: params
  })
}

//合同台账上传文件明细
export function GetTZData(params) {
  return request({
    url: '/api/BeginDataMng/GetTZData',
    method: 'get',
    params: params
  })
}




//导出标的明细
export function ExportInvs(data) {
  return request({
    url: '/api/HTManage/GetDetailData',
    method: 'post',
    responseType: 'blob',
    data: data,
    params:data
  })
}



